package com.cn.xiaonuo.slbfinances.slbshopes.controller;

import com.cn.xiaonuo.common.entity.BusinessMessage;
import com.cn.xiaonuo.slbfinances.slbshopes.service.ISlbShopService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class SlbShopController {

    @Resource
    private ISlbShopService slbShopService;

    @ApiOperation(value = "财务管理-出账-推广商家提成", notes = "财务管理-出账-推广商家提成")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户ID（String）"),
            @ApiImplicitParam(name = "orderId", value = "订单ID（Integer）"),
            @ApiImplicitParam(name = "realName", value = "真实姓名", example = "张三"),
            @ApiImplicitParam(name = "phone", value = "电话号码", example = "13800138000"),
            @ApiImplicitParam(name = "startTime", value = "开始时间（Long）", example = "102565455"),
            @ApiImplicitParam(name = "endTime", value = "结束时间（Long）", example = "102565455"),
            @ApiImplicitParam(name = "status", value = "状态", example = "1"),
            @ApiImplicitParam(name = "pageNo", value = "第几页（Integer）", required = true),
            @ApiImplicitParam(name = "pageSize", value = "每页长度（Integer）", required = true)
    })
    @RequestMapping(value = "api/slbshop/platformPaymentRecord", method = RequestMethod.POST)
    public BusinessMessage platformPaymentRecord1(Integer pageNo, Integer pageSize,
                                                  String realName,
                                                  String phone,
                                                  String status,
                                                  Long startTime,
                                                  Long endTime,
                                                  String userId,
                                                  Integer orderId) {
        return slbShopService.platformPaymentRecord(pageNo, pageSize, realName, phone, status, startTime, endTime, userId, orderId);
    }

    @ApiOperation(value = "财务管理-出账-推广商家提成-确认付款", notes = "财务管理-出账-推广商家提成-确认付款")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "用户ID（String）")
    })
    @RequestMapping(value = "api/slbshop/confirmationPayment", method = RequestMethod.POST)
    public BusinessMessage<Object> confirmationPayment(String id) throws Exception {
        return slbShopService.confirmationPayment(id);
    }
}
